TablesGetDouble Subroutine

private subroutine TablesGetDouble(valueIn, tables, id, keyIn, keyOut, match, valueOut, bound)

returns a double from column defined by keyOut corresponding to valueIn contained in column defined by keyIn. Table is identified by its id. Arguments: valueIn input value tables collection of tables to search in id id of the table to search in keyIn defines header of the column of the input value keyOut defines header of the column of the output value match method to match input value. Possible values are: 'exact' = column must contain exact input value 'linear' = calculates linear interpolation between two bounding values 'nearest' = search for the nearest value in input column bound method to manage bounds. Possible values are: 'fixed' = extreme values are treated as a wall 'extendlinear' = extend bounds with linear interpolation of last two extreme values 'extendconstant' = extend bounds preserving extreme value constant

Arguments

Type IntentOptional Attributes Name
real(kind=float), intent(in) :: valueIn
type(TableCollection), intent(in) :: tables
character(len=*), intent(in) :: id
character(len=*), intent(in) :: keyIn
character(len=*), intent(in) :: keyOut
character(len=*), intent(in) :: match
real(kind=double), intent(out) :: valueOut
character(len=*), intent(in), optional :: bound

Source Code

SUBROUTINE TablesGetDouble &
!
( valueIn, tables, id, keyIn, keyOut, match, valueOut, bound )

IMPLICIT NONE

! Function arguments
! Scalar arguments with intent(in):
REAL (KIND = float),  INTENT (IN) :: valueIn
CHARACTER (LEN = *),  INTENT (IN) :: id
CHARACTER (LEN = *),  INTENT (IN) :: keyIn
CHARACTER (LEN = *),  INTENT (IN) :: keyOut
CHARACTER (LEN = *),  INTENT (IN) :: match
CHARACTER (LEN = *),  OPTIONAL, INTENT (IN) :: bound

! Type defined arguments with intent (in):
TYPE (TableCollection), INTENT (IN) :: tables

! Scalar arguments with intent(in):
REAL (KIND = double), INTENT (OUT) :: valueOut

!------------end of declaration------------------------------------------------


IF ( PRESENT (bound) ) THEN
  CALL TableGetDouble ( valueIn, tables % elem ( TableSyncById (tables, id) ), &
                       keyIn, keyOut, match, valueOut, bound )
ELSE
  CALL TableGetDouble ( valueIn, tables % elem ( TableSyncById (tables, id) ), &
                       keyIn, keyOut, match, valueOut)
END IF

END SUBROUTINE TablesGetDouble